﻿<UserControl x:Class="cpe.cpein.UI.Controls.UCGroup"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="660" d:DesignWidth="930" Loaded="UserControl_Loaded" Background="White">
    <Grid Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <TextBlock Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="4" Text="" Name="lblTitleCompanyName" FontSize="18"/>
        <Button Name="btConnect" Content="Se connecter" Grid.Column="7" Grid.Row="0" Click="btConnect_Click"/>
        <Button Name="btDisconnect" Content="Se déconnecter" Grid.Column="7" Grid.Row="0" Click="btDisconnect_Click" Visibility="Hidden"/>
        <Button Name="btEdit" Content="Modifier" Grid.Column="8" Grid.Row="0" Click="btEdit_Click"/>
        <Button Name="btValidate" Content="Valider" Grid.Column="8" Grid.Row="0" Click="btValidate_Click" Visibility="Hidden"/>
        <Button Name="btCancel" Content="Annuler" Grid.Column="9" Grid.Row="0" Click="btCancel_Click" Visibility="Hidden"/>
        <Button Name="btRefresh" Content="Actualiser" Grid.Column="9" Grid.Row="0" Click="btRefresh_Click"/>
        <Rectangle Grid.ColumnSpan="9" Grid.Column="1" Fill="White" Margin="10,10,10,10" Grid.Row="1" Grid.RowSpan="20" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch" />

        <TextBlock Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="1" Text="Identité" Name="lblGroupInfo" VerticalAlignment="Center" Grid.RowSpan="2" Margin="30,0,0,0" FontSize="15"/>
        <Rectangle Grid.ColumnSpan="9" Grid.Column="1" Fill="#FFF4F4F5" Margin="25,15,25,10" Grid.Row="2" Grid.RowSpan="10" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch"/>
        <TextBlock Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="1" Text="Nom" Name="lblCompanyName" VerticalAlignment="Center" Margin="40,0,0,0"/>
        <TextBox Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="3" Text="" Name="txtCompanyName" VerticalAlignment="Center"/>
        <TextBlock Grid.Column="6" Grid.Row="3" Grid.ColumnSpan="1" Text="Type" Name="lblType" VerticalAlignment="Center" Margin="20,0,0,0"/>
        <ComboBox Name="cmbType" Grid.Column="7" Grid.Row="3" Grid.ColumnSpan="3" DisplayMemberPath="Label" SelectedValuePath="Id" Margin="0,0,40,0" />
        <TextBlock Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2" Text="Description" Name="lblCompanyDescription" VerticalAlignment="Center" Margin="40,0,0,0"/>
        <TextBox Name="txtCompanyDescription" Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="9" Grid.RowSpan="6" Margin="40,0,40,0" VerticalAlignment="Stretch" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"/>
        
        <TextBlock Grid.Column="6" Grid.Row="13" Grid.ColumnSpan="1" Grid.RowSpan="2" Text="Adresse" Name="lblAddress" VerticalAlignment="Top" Margin="20,0,0,0" FontSize="15"/>
        <Rectangle Grid.ColumnSpan="4" Grid.Column="6" Fill="#FFF4F4F5" Margin="10,25,25,10" Grid.Row="13" Grid.RowSpan="7" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch"/>
        <TextBlock Grid.Column="6" Grid.Row="14" Grid.ColumnSpan="1" Text="Libellé" Name="lblAddressLabel" VerticalAlignment="Center" Margin="30,0,0,0"/>
        <TextBox Name="txtAddressLabel"  Grid.Column="7" Grid.Row="14" Grid.ColumnSpan="3" VerticalAlignment="Center" Margin="0,0,40,0"/>
        <TextBlock Grid.Column="6" Grid.Row="15" Grid.ColumnSpan="1" Text="Adresse" Name="lblAddressAddr" VerticalAlignment="Center" Margin="30,0,0,0"/>
        <TextBox Name="txtAddressAddr" Grid.Column="7" Grid.Row="15" Grid.ColumnSpan="3" Grid.RowSpan="2" Margin="0,0,40,0" VerticalAlignment="Stretch" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"/>
        <TextBlock Grid.Column="6" Grid.Row="17" Grid.ColumnSpan="1" Text="Ville" Name="lblAddressCity" VerticalAlignment="Center" Margin="30,0,0,0"/>
        <TextBox Name="txtAddressCity" Grid.Column="7" Grid.Row="17" Grid.ColumnSpan="3" Grid.RowSpan="1" Margin="0,0,40,0" VerticalAlignment="Center"/>
        <TextBlock Grid.Column="6" Grid.Row="18" Grid.ColumnSpan="1" Text="Pays" Name="lblAddressCountry" VerticalAlignment="Center" Margin="30,0,0,0"/>
        <ComboBox Name="cmbAddressCountry" Grid.Column="7" Grid.Row="18" Grid.ColumnSpan="3" Margin="0,0,40,0" DisplayMemberPath="Label" SelectedValuePath="Id" />

        <TextBlock Grid.Column="1" Grid.Row="13" Grid.ColumnSpan="1" Grid.RowSpan="2" Text="Membres" Name="lblMembers" VerticalAlignment="Top" Margin="30,0,0,0" FontSize="15"/>
        <Rectangle Grid.ColumnSpan="4" Grid.Column="1" Fill="#FFF4F4F5" Margin="25,25,25,10" Grid.Row="13" Grid.RowSpan="7" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch"/>
        <DataGrid HeadersVisibility="None" MouseDoubleClick="MembersGrid_DblClick" IsReadOnly="True" AutoGenerateColumns="False" Name="MembersGrid" SelectedValuePath="Id" Grid.Column="1" Grid.Row="14" Grid.ColumnSpan="4" Grid.RowSpan="6" Margin="35,0,35,20">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Name}" FontSize="13" MinWidth="100" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Lastname}" FontSize="13" MinWidth="100" Width="Auto" />
            </DataGrid.Columns>
        </DataGrid>
        
    </Grid>
</UserControl>
